package com.example.demo1.rabbitmq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;

/**
 * Created by Lx on 2018/7/5.
 */
@Slf4j
@Component
@EnableBinding(StreamClient.class)
public class SpringCloudStreamRabbitMQ {
    @StreamListener("myMessageResponse")
    public void process1(String message){
        //接收到供应商返回的信息进行自己的业务处理，把订单状态改为已完成。
        log.info("demo one -----   application --- 测试消息队列的接收内容为==========="+message);
    }

}
